<?php
date_default_timezone_set('UTC');


if(isset($_GET['username'] )&& isset($_GET['message'] )){
   $username= $_GET['username'];
   $message= $_GET['message'];
   $time = strftime("%d.%m.%Y %H:%M:%S");
   
  
   $arrayOneMessage=array();
   $arrayOneMessage = [$username,$message,$time];
   
 $StringOneMessage = json_encode($arrayOneMessage);
 session_start();
 $_SESSION['SessionOneMessage']=$StringOneMessage;
// echo "<h2>$StringOneMessage</h2>";

}  else {
    echo 'error';    
}
 echo "<h2>$StringOneMessage</h2>";



?>
